<template>
    <div class="new-item">
        <img :src="data.pic" alt="" />
        <div class="new-item-body">
            <p class="new-title" v-html="data.title"></p>
            <p class="new-time">日期：{{ data.time }}</p>
            <p class="new-source">来源：{{ data.src }}</p>
        </div>
    </div>
</template>

<script>
import { defineComponent } from '@vue/runtime-core'

export default defineComponent({
    props: {
        data: {
            type: Object,
            required: true,
        },
    },
})
</script>

<style scoped>
.new-item {
    display: flex;
    padding: 10px 20px;
}
.new-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    object-position: center;
	margin-right: 10px;
}
.new-item-body {
	flex: 1;
}
.new-time,
.new-category,
.new-source {
    font-size: 12px;
    color: #8891ab;
}
.new-title {
	margin-bottom: 6px;
}
</style>
